class Solution:
    def maxArea(self, height: list[int]) -> int:
        max_water = 0
        left = 0
        right = len(height) - 1
        
        while left < right:
            current_height = min(height[left], height[right])
            width = right - left
            current_water = current_height * width
            
            if current_water > max_water:
                max_water = current_water
            
            if height[left] < height[right]:
                left += 1
            else:
                right -= 1
        
        return max_water    